package com.twt.survey.common;

import lombok.Getter;

@Getter
public enum ErrorCode {
    SUCCESS(0, "ok", ""),

    PARAMS_ERROR(40000, "请求参数错误", ""),
    NOT_FOUND_ERROR(40001, "请求的数据为空", ""),
    ABNORMAL_STATUS(40002, "用户状态异常", ""),
    UNFINISHED_STATUS(40003, "未完成填写", "存在必填部分未填写"),

    SYSTEM_ERROR(50000, "服务器异常", ""),
    SERVER_ERROR(50001, "后台处理异常", ""),
    OPERATION_ERROR(50002, "操作失败", "");


    /**
     * 状态码
     */
    private final int code;
    /**
     * 状态码描述
     */
    private final String msg;
    /**
     * 详细信息
     */
    private final String description;

    ErrorCode(int code, String msg, String description) {
        this.code = code;
        this.msg = msg;
        this.description = description;
    }
}
